Integrand size = 25, antiderivative size = 37 \[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {\sin (e+f x)}} \, dx=-\frac {2 \sqrt {a} \arcsin \left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{f} \]
Result contains complex when optimal does not.
Time = 0.73 (sec) , antiderivative size = 164, normalized size of antiderivative = 4.43 \[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {\sin (e+f x)}} \, dx=\frac {(1+i) e^{\frac {1}{2} i (e+f x)} \sqrt {-i e^{-i (e+f x)} \left (-1+e^{2 i (e+f x)}\right )} \left (\arctan \left (\sqrt {-1+e^{2 i (e+f x)}}\right )-i \text {arctanh}\left (\frac {e^{i (e+f x)}}{\sqrt {-1+e^{2 i (e+f x)}}}\right )\right ) \sqrt {a (1+\sin (e+f x))}}{\sqrt {2} \sqrt {-1+e^{2 i (e+f x)}} f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )} \]
((1 + I)*E^((I/2)*(e + f*x))*Sqrt[((-I)*(-1 + E^((2*I)*(e + f*x))))/E^(I*( e + f*x))]*(ArcTan[Sqrt[-1 + E^((2*I)*(e + f*x))]] - I*ArcTanh[E^(I*(e + f *x))/Sqrt[-1 + E^((2*I)*(e + f*x))]])*Sqrt[a*(1 + Sin[e + f*x])])/(Sqrt[2] *Sqrt[-1 + E^((2*I)*(e + f*x))]*f*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2]))
Time = 0.23 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {3042, 3253, 223}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sqrt {a \sin (e+f x)+a}}{\sqrt {\sin (e+f x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sqrt {a \sin (e+f x)+a}}{\sqrt {\sin (e+f x)}}dx\) |
\(\Big \downarrow \) 3253 |
\(\displaystyle -\frac {2 \int \frac {1}{\sqrt {1-\frac {a \cos ^2(e+f x)}{\sin (e+f x) a+a}}}d\frac {a \cos (e+f x)}{\sqrt {\sin (e+f x) a+a}}}{f}\) |
\(\Big \downarrow \) 223 |
\(\displaystyle -\frac {2 \sqrt {a} \arcsin \left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {a \sin (e+f x)+a}}\right )}{f}\) |
3.1.85.3.1 Defintions of rubi rules used
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt [a])]/Rt[-b, 2], x] /; FreeQ[{a, b}, x] && GtQ[a, 0] && NegQ[b]
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/Sqrt[(d_.)*sin[(e_.) + (f_.) *(x_)]], x_Symbol] :> Simp[-2/f Subst[Int[1/Sqrt[1 - x^2/a], x], x, b*(Co s[e + f*x]/Sqrt[a + b*Sin[e + f*x]])], x] /; FreeQ[{a, b, d, e, f}, x] && E qQ[a^2 - b^2, 0] && EqQ[d, a/b]
Leaf count of result is larger than twice the leaf count of optimal. \(274\) vs. \(2(31)=62\).
Time = 5.82 (sec) , antiderivative size = 275, normalized size of antiderivative = 7.43
method | result | size |
default | \(\frac {\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )}\, \sqrt {a \left (\sin \left (f x +e \right )+1\right )}\, \left (\sqrt {\sin }\left (f x +e \right )\right ) \left (\ln \left (-\frac {\csc \left (f x +e \right )-\cot \left (f x +e \right )+\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )}\, \sqrt {2}+1}{\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )}\, \sqrt {2}-\csc \left (f x +e \right )+\cot \left (f x +e \right )-1}\right )+4 \arctan \left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )}\, \sqrt {2}+1\right )+4 \arctan \left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )}\, \sqrt {2}-1\right )+\ln \left (-\frac {\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )}\, \sqrt {2}-\csc \left (f x +e \right )+\cot \left (f x +e \right )-1}{\csc \left (f x +e \right )-\cot \left (f x +e \right )+\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )}\, \sqrt {2}+1}\right )\right ) \sqrt {2}}{2 f \left (-\cos \left (f x +e \right )+1+\sin \left (f x +e \right )\right )}\) | \(275\) |
1/2/f*(-cot(f*x+e)+csc(f*x+e))^(1/2)*(a*(sin(f*x+e)+1))^(1/2)*sin(f*x+e)^( 1/2)*(ln(-(csc(f*x+e)-cot(f*x+e)+(-cot(f*x+e)+csc(f*x+e))^(1/2)*2^(1/2)+1) /((-cot(f*x+e)+csc(f*x+e))^(1/2)*2^(1/2)-csc(f*x+e)+cot(f*x+e)-1))+4*arcta n((-cot(f*x+e)+csc(f*x+e))^(1/2)*2^(1/2)+1)+4*arctan((-cot(f*x+e)+csc(f*x+ e))^(1/2)*2^(1/2)-1)+ln(-((-cot(f*x+e)+csc(f*x+e))^(1/2)*2^(1/2)-csc(f*x+e )+cot(f*x+e)-1)/(csc(f*x+e)-cot(f*x+e)+(-cot(f*x+e)+csc(f*x+e))^(1/2)*2^(1 /2)+1)))*2^(1/2)/(-cos(f*x+e)+1+sin(f*x+e))
Leaf count of result is larger than twice the leaf count of optimal. 91 vs. \(2 (31) = 62\).
Time = 0.39 (sec) , antiderivative size = 330, normalized size of antiderivative = 8.92 \[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {\sin (e+f x)}} \, dx=\left [\frac {\sqrt {-a} \log \left (\frac {128 \, a \cos \left (f x + e\right )^{5} - 128 \, a \cos \left (f x + e\right )^{4} - 416 \, a \cos \left (f x + e\right )^{3} + 128 \, a \cos \left (f x + e\right )^{2} - 8 \, {\left (16 \, \cos \left (f x + e\right )^{4} - 24 \, \cos \left (f x + e\right )^{3} - 66 \, \cos \left (f x + e\right )^{2} + {\left (16 \, \cos \left (f x + e\right )^{3} + 40 \, \cos \left (f x + e\right )^{2} - 26 \, \cos \left (f x + e\right ) - 51\right )} \sin \left (f x + e\right ) + 25 \, \cos \left (f x + e\right ) + 51\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {-a} \sqrt {\sin \left (f x + e\right )} + 289 \, a \cos \left (f x + e\right ) + {\left (128 \, a \cos \left (f x + e\right )^{4} + 256 \, a \cos \left (f x + e\right )^{3} - 160 \, a \cos \left (f x + e\right )^{2} - 288 \, a \cos \left (f x + e\right ) + a\right )} \sin \left (f x + e\right ) + a}{\cos \left (f x + e\right ) + \sin \left (f x + e\right ) + 1}\right )}{4 \, f}, \frac {\sqrt {a} \arctan \left (\frac {{\left (8 \, \cos \left (f x + e\right )^{2} + 8 \, \sin \left (f x + e\right ) - 9\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {a} \sqrt {\sin \left (f x + e\right )}}{4 \, {\left (2 \, a \cos \left (f x + e\right )^{3} + a \cos \left (f x + e\right ) \sin \left (f x + e\right ) - 2 \, a \cos \left (f x + e\right )\right )}}\right )}{2 \, f}\right ] \]
[1/4*sqrt(-a)*log((128*a*cos(f*x + e)^5 - 128*a*cos(f*x + e)^4 - 416*a*cos (f*x + e)^3 + 128*a*cos(f*x + e)^2 - 8*(16*cos(f*x + e)^4 - 24*cos(f*x + e )^3 - 66*cos(f*x + e)^2 + (16*cos(f*x + e)^3 + 40*cos(f*x + e)^2 - 26*cos( f*x + e) - 51)*sin(f*x + e) + 25*cos(f*x + e) + 51)*sqrt(a*sin(f*x + e) + a)*sqrt(-a)*sqrt(sin(f*x + e)) + 289*a*cos(f*x + e) + (128*a*cos(f*x + e)^ 4 + 256*a*cos(f*x + e)^3 - 160*a*cos(f*x + e)^2 - 288*a*cos(f*x + e) + a)* sin(f*x + e) + a)/(cos(f*x + e) + sin(f*x + e) + 1))/f, 1/2*sqrt(a)*arctan (1/4*(8*cos(f*x + e)^2 + 8*sin(f*x + e) - 9)*sqrt(a*sin(f*x + e) + a)*sqrt (a)*sqrt(sin(f*x + e))/(2*a*cos(f*x + e)^3 + a*cos(f*x + e)*sin(f*x + e) - 2*a*cos(f*x + e)))/f]
\[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {\sin (e+f x)}} \, dx=\int \frac {\sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )}}{\sqrt {\sin {\left (e + f x \right )}}}\, dx \]
Leaf count of result is larger than twice the leaf count of optimal. 210 vs. \(2 (31) = 62\).
Time = 0.31 (sec) , antiderivative size = 210, normalized size of antiderivative = 5.68 \[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {\sin (e+f x)}} \, dx=-\frac {2 \, \sqrt {2} \sqrt {a} \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )^{\frac {3}{2}} - 3 \, \sqrt {2} {\left (\sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} + 2 \, \sqrt {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )}\right ) + \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} - 2 \, \sqrt {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )}\right )\right )} \sqrt {a} + 6 \, \sqrt {2} \sqrt {a} \sqrt {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}} - \frac {2 \, {\left (\frac {3 \, \sqrt {2} \sqrt {a} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {\sqrt {2} \sqrt {a} \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}}{\sqrt {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}}}{3 \, f} \]
-1/3*(2*sqrt(2)*sqrt(a)*(sin(f*x + e)/(cos(f*x + e) + 1))^(3/2) - 3*sqrt(2 )*(sqrt(2)*arctan(1/2*sqrt(2)*(sqrt(2) + 2*sqrt(sin(f*x + e)/(cos(f*x + e) + 1)))) + sqrt(2)*arctan(-1/2*sqrt(2)*(sqrt(2) - 2*sqrt(sin(f*x + e)/(cos (f*x + e) + 1)))))*sqrt(a) + 6*sqrt(2)*sqrt(a)*sqrt(sin(f*x + e)/(cos(f*x + e) + 1)) - 2*(3*sqrt(2)*sqrt(a)*sin(f*x + e)/(cos(f*x + e) + 1) + sqrt(2 )*sqrt(a)*sin(f*x + e)^2/(cos(f*x + e) + 1)^2)/sqrt(sin(f*x + e)/(cos(f*x + e) + 1)))/f
\[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {\sin (e+f x)}} \, dx=\int { \frac {\sqrt {a \sin \left (f x + e\right ) + a}}{\sqrt {\sin \left (f x + e\right )}} \,d x } \]
Timed out. \[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {\sin (e+f x)}} \, dx=\int \frac {\sqrt {a+a\,\sin \left (e+f\,x\right )}}{\sqrt {\sin \left (e+f\,x\right )}} \,d x \]